﻿using System;
using System.Diagnostics;
using System.Diagnostics.Contracts;

namespace DaveSexton.Labs
{
#if NETFX_CORE
	public partial class WindowsStoreLab
#elif WINDOWS_PHONE
	public partial class PhoneLab
#elif SILVERLIGHT
	public partial class SilverlightLab
#else
	public partial class WindowsLab
#endif
	{
		public static string Format(string message, params object[] args)
		{
			Contract.Ensures(Contract.Result<string>() != null);

			return LabTraceSource.Format(message, args);
		}

		#region Tracing
		public void Trace(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.Trace(format, args);
		}

		public void Trace(object value)
		{
			Contract.Assume(Proxy != null);

			Proxy.Trace(value);
		}

		public void Trace(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.Trace(message);
		}

		public void TraceLine()
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceLine();
		}

		public void TraceLine(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceLine(format, args);
		}

		public void TraceLine(object value)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceLine(value);
		}

		public void TraceLine(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceLine(message);
		}
		#endregion

		#region Semantic Tracing
		public virtual void TraceDescription(string description)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceDescription(description);
		}

		public void TraceSuccess(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceSuccess(format, args);
		}

		public void TraceSuccess(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceSuccess(message);
		}

		public void TraceSuccess()
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceSuccess();
		}

		public void TraceFailure(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceFailure(format, args);
		}

		public void TraceFailure(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceFailure(message);
		}

		public void TraceFailure()
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceFailure();
		}

		public void TraceStatus(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceStatus(format, args);
		}

		public void TraceStatus(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceStatus(message);
		}

		public void TraceTitle(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceTitle(format, args);
		}

		public void TraceTitle(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceTitle(message);
		}
		#endregion

		#region Event Tracing
		public void TraceEvent(TraceEventType eventType, string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceEvent(eventType, format, args);
		}

		public void TraceEvent(TraceEventType eventType, string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceEvent(eventType, message);
		}

		public void TraceError(Exception exception)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceError(exception);
		}

		public void TraceError(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceError(message);
		}

		public void TraceError(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceError(format, args);
		}

		public void TraceWarning(string message)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceWarning(message);
		}

		public void TraceWarning(string format, params object[] args)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceWarning(format, args);
		}
		#endregion

		#region Time Tracing
		public void TraceTime(string format, params object[] additionalArgs)
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceTime(format, additionalArgs);
		}

		public void TraceTime()
		{
			Contract.Assume(Proxy != null);

			Proxy.TraceTime();
		}

		public void ResetTime()
		{
			Contract.Assume(Proxy != null);

			Proxy.ResetTime();
		}
		#endregion
	}
}